package com.yonyougov.devops.cruxcisupport.harbor.repositories;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/api/v2/harbor")
public class HarborRepositoriesController {
    @Autowired
    private HarborRepositoriesService harborRepositoriesService;

    @GetMapping(value = "/repositories")
    public List<HarborRepositories> getRepositories(@RequestParam String projectName,@RequestParam Integer page,@RequestParam Integer pageSize){
        return harborRepositoriesService.getRepositories(projectName, page, pageSize);
    }
}
